<form class="form-horizontal" name="CtrlForm" role="form" novalidate="novalidate" ng-submit="submit()" ng-controller='CategoryEditCtrl'>
	<div class="form-group has-feedback">
	  <label for="cat_name" class="col-md-2 control-label">栏目名称</label>
	  <div class="col-md-6">
		<div class="input-group">
			<input type="text" class="form-control" id="cat_name" name="cat_name" placeholder="请输入栏目名称" required ng-model='cate.cat_name' />
			<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ng-show="CtrlForm.cat_name.$dirty && CtrlForm.cat_name.$valid" style="margin-right:40px;"></span>
			<span class="input-group-addon" style="color:red;">必填</span>		
		</div>
	  </div>
	</div>
	
	<div class="form-group">
	  <label for="parent_id" class="col-md-2 control-label">所属栏目</label>
	  <div class="col-md-6">
	  
		<div class="input-group">
			<select class="form-control" id="parent_id" name="parent_id" ng-model='cate.parent_id'>
				<option value="0">顶级分类</option>
				<option ng-repeat="item in data" value="{{item.cat_id}}" ng-class="item.level|levelClass" ng-selected="item.cat_id==cate.parent_id" ng-if="selfTree.indexOf(item.cat_id)==-1">{{'&nbsp;&nbsp;&nbsp;'|levelRepeat:item.level}}{{item.cat_name}}</option>
			</select>
			<span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true" ng-show="CtrlForm.parent_id.$dirty && CtrlForm.parent_id.$valid" style="margin-right:70px;"></span>
			<span class="input-group-addon" style="color:red;">必填</span>		
		</div> <!-- /btn-group -->
	
	  </div>
	</div>
   
	<div class="form-group has-feedback">
	  <label class="col-md-2 control-label">封面图</label>
	  <div class="col-md-6">
		<input type="file" class="form-control" id="fileInput" name="cover_path" file-model="myFile" ng-show="showInputFile" />
		<img ng-src="__UPLOAD__/{{cate.cover_path}}" style="cursor:pointer;max-height:100px;margin:0 auto;display:block;" ng-show="!showInputFile" title="点击更换封面图" ng-click="changeCover()" />
		<button type="button" class="btn btn-success" ng-show="!showInputFile" style="margin:10px auto;display:block;" ng-click="changeCover()">点击更换封面图</button>
	  </div>
	</div>
	<div class="form-group has-feedback">
		<div class="col-md-12">
		<include file="Image/crop" />
		</div>
	</div>
	
	<div class="form-group has-feedback">
	  <label for="cat_order" class="col-md-2 control-label">显示顺序</label>
	  <div class="col-md-6">
		<input type="number" class="form-control" id="cat_order" name="cat_order" ng-model='cate.cat_order' placeholder="排序位置">
		<span class="glyphicon glyphicon-ok form-control-feedback" ng-show="CtrlForm.cat_order.$dirty && CtrlForm.cat_order.$valid"></span>
	  </div>
	</div>
	
	<div class="form-group has-feedback">
	  <label for="keywords" class="col-md-2 control-label">栏目SEO关键词</label>
	  <div class="col-md-6">
		<input type="text" class="form-control" id="keywords" name="keywords" placeholder='多个关键词用英文逗号,分隔' ng-model='cate.keywords'>
	  </div>
	</div>
	
	<div class="form-group has-feedback">
	  <label for="cat_desc" class="col-md-2 control-label">栏目SEO简介</label>
	  <div class="col-md-6">
		<textarea class="form-control" rows="3" id="cat_desc" name="cat_desc" ng-model='cate.cat_desc'></textarea>
	  </div>
	</div>

   <div class="form-group has-feedback">
      <div class="col-md-offset-2 col-md-6">		
		<button type="reset" class="btn btn-default" ng-click="reset()">重置</button>		
        <button type="submit" class="btn btn-primary" ng-disabled="CtrlForm.$invalid">保存</button>
      </div>
   </div>
</form>